<!--
* @author wn
* @date 2023/03/06 16:07:33
* @description: 主页框架
!-->
<template>
	<global-layout>
		<!-- 右侧头部 Tags -->
		<global-tags @tagPathClick="tagPathClick" />
		<!-- 主区域 views keep-alive :include="cacheViews" :exclude -->
		<router-view v-slot="{ Component }">
			<keep-alive>
				<component :is="Component" />
			</keep-alive>
		</router-view>
	</global-layout>
</template>
<script setup>
import GlobalLayout from '@/components/page/GlobalLayout'
import GlobalTags from '@/components/page/GlobalTags'
import { provide, ref } from 'vue'

// 点击 tag 传递 path
const tagPath = ref('')
const tagPathClick = path => {
	tagPath.value = path
}

// 直接向 SideMenu 注入
provide('tagPath', tagPath)
</script>
<style scoped lang="less"></style>
